{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "美元指数，与美元的强弱正相关"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                date   USDX\n",
      "0   2025-01-19 00:00  37.55\n",
      "1   2025-01-19 00:10  37.55\n",
      "2   2025-01-19 00:20  37.55\n",
      "3   2025-01-19 00:30  37.55\n",
      "4   2025-01-19 00:40  37.55\n",
      "5   2025-01-19 00:50  37.55\n",
      "6   2025-01-19 01:00  37.55\n",
      "7   2025-01-19 01:10  37.55\n",
      "8   2025-01-19 01:20  37.55\n",
      "9   2025-01-19 01:30  37.55\n",
      "10  2025-01-19 01:40  37.55\n",
      "11  2025-01-19 01:50  37.55\n",
      "12  2025-01-19 02:00  37.55\n",
      "13  2025-01-19 02:30  37.55\n",
      "14  2025-01-19 02:40  37.55\n",
      "15  2025-01-19 02:50  37.55\n",
      "16  2025-01-19 03:00  37.55\n",
      "17  2025-01-19 03:10  37.55\n",
      "18  2025-01-19 03:20  37.55\n",
      "19  2025-01-19 03:30  37.55\n",
      "20  2025-01-19 03:40  37.55\n",
      "21  2025-01-19 03:50  37.55\n",
      "22  2025-01-19 04:00  37.54\n",
      "23  2025-01-19 04:10  37.54\n",
      "24  2025-01-19 04:20  37.54\n",
      "25  2025-01-19 04:30  37.54\n",
      "26  2025-01-19 04:40  37.54\n",
      "27  2025-01-19 04:50  37.54\n",
      "28  2025-01-19 05:00  37.54\n",
      "29  2025-01-19 05:10  37.54\n",
      "30  2025-01-19 05:20  37.55\n",
      "31  2025-01-19 05:30  37.55\n",
      "32  2025-01-19 05:40  35.69\n",
      "33  2025-01-19 05:50  37.55\n",
      "34  2025-01-19 06:00  37.54\n",
      "35  2025-01-19 06:10  37.54\n",
      "36  2025-01-19 06:20  37.54\n",
      "37  2025-01-19 06:30  37.54\n",
      "38  2025-01-19 06:40  37.54\n",
      "39  2025-01-19 06:50  37.54\n",
      "40  2025-01-19 07:00  36.43\n",
      "41  2025-01-19 07:10  37.54\n",
      "42  2025-01-19 07:20  37.54\n",
      "43  2025-01-19 07:30  37.54\n",
      "44  2025-01-19 07:40  37.54\n",
      "45  2025-01-19 07:50  37.54\n",
      "46  2025-01-19 08:00  36.31\n",
      "47  2025-01-19 08:10  37.54\n"
     ]
    }
   ],
   "source": [
    "import akshare as ak\n",
    "from datetime import datetime\n",
    "\n",
    "test_date = datetime.now().date().isoformat().replace(\"-\", \"\")\n",
    "macro_fx_sentiment_df = ak.macro_fx_sentiment(start_date=test_date, end_date=test_date)[['date','USDX']]\n",
    "print(macro_fx_sentiment_df)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
